/**
 * 
 */
Ext.application({
	name: 'vacs',
	appFolder: '../app',
	
	controllers: ['tiporegistro.TipoRegistroShowController'],
	
	launch: function() {
		var form = Ext.ClassManager.instantiate('vacs.view.tiporegistro.ShowView', {
			renderTo: 'show-TipoRegistro'
		});
		
		var tipoReg = Ext.ModelManager.getModel('vacs.model.TipoRegistro');
		
		
		// cargamos el model pasandole como parametro el id del objeto
		tipoReg.load(Ext.getDom('itemId').value, {
			success: function(record, operation) {
				
				console.log(record);
				form.loadRecord(record);
		    }
		});
		
		this.getController('tiporegistro.TipoRegistroShowController').widgets.push(form);
		
	}
});